from django.contrib import admin

# Register your models here.
from web import models


admin.site.site_header = 'Trcaer管理平台'
admin.site.site_title = 'Trcaer管理平台'


class User(admin.ModelAdmin):
    list_display = ['id','username','email','mobile_phone','password']
    search_fields = ['username','email','mobile_phone','password']
    # custom_button.icon='far fa-address-card'

class PricePolicy(admin.ModelAdmin):
    list_display = ['category','title','price','project_num','project_member','project_space','per_file_size','create_datetime']
    search_fields = ['category','title','price','project_num','project_member','project_space','per_file_size','create_datetime']


class Transaction(admin.ModelAdmin):
    list_display = ['status','oder','user','price_policy','count','price','start_datetime','end_datetime','create_datetime']
    search_fields = ['status','oder','user','price_policy','count','price','start_datetime','end_datetime','create_datetime']


class Project(admin.ModelAdmin):
    list_display = ['name','color','desc','use_space','star','join_count','creator','create_datetime']
    search_fields = ['name','color','desc','use_space','star','join_count','creator','create_datetime']


class ProjectUser(admin.ModelAdmin):
    list_display = ['user','project','star','create_datetime']
    search_fields = ['user','project','star','create_datetime']


admin.site.register(models.UserInfo,User)
admin.site.register(models.PricePolicy,PricePolicy)
admin.site.register(models.Transaction,Transaction)
admin.site.register(models.Project,Project)
admin.site.register(models.ProjectUser,ProjectUser)